import axios from "../index.js";
// 预警日报
// 列表
export const getListApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/listPage",
    method: "post",
    data: data
  });
};

// 新增
export const addApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/save",
    method: "post",
    data: data
  });
};
// 提交
export const submitApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/submit",
    method: "post",
    data: data
  });
};

// 编辑
export const updateApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/updById",
    method: "post",
    data: data
  });
};

// 获取详情
export const getByIdApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/getById",
    method: "get",
    data: data
  });
};

// 删除
export const delApi = (id) => {
  return axios.request({
    url: `/warning/warningDaily/deleteById/${id}`,
    method: "get"
    // data: data
  });
};

// 通过预警通知单获取预警日报
export const getDayByYjtzdApi = (id, data) => {
  return axios.request({
    url: `/warning/warningDaily/informById/${id}`,
    method: "get",
    data: data
  });
};

// 预警日报首页日历
export const getDayCalendarApi = (data) => {
  return axios.request({
    url: `/warning/warningDaily/weather`,
    method: "get",
    data: data
  });
};
// 预警日报当日日报统计
export const dailyStatisticsApi = (data) => {
  return axios.request({
    url: `/warning/warningDaily/statistics`,
    method: "get",
    data: data
  });
};

// 获取左侧流程
export const getLeftFlowApi = (data) => {
  return axios.request({
    url: "/warning/warningFlow/getFlowList",
    method: "get",
    data: data
  });
};

// 获取预警信息投入力量
export const getPutDataApi = (data) => {
  return axios.request({
    url: "/warning/warningNotification/getById",
    method: "get",
    data: data
  });
};

// 获取单位部门树
export const getUnitTreeApi = (data) => {
  return axios.request({
    url: "/system/organization/tree",
    method: "post",
    data: data
  });
};
// 通过预警通知单获取日报名称
export const getDailyNameApi = (data) => {
  return axios.request({
    url: "/warning/warningDaily/getDailyName",
    method: "get",
    data: data
  });
};



